package com.space.netspider;


import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.List;

/**
 * @Author Administrator
 * @Date 2021/6/10 0010 14:50
 * @Version 1.0
 */
public class FileWriteTool{
    public static void write(String path, List<LawyerBean> lawyerBeanList){
        try {
            PrintWriter printWriter = new PrintWriter(new OutputStreamWriter(new FileOutputStream(path), "UTF-8"));
            for (int i = 0;i < lawyerBeanList.size();i++){
                LawyerBean lawyerBean = lawyerBeanList.get(i);
                printWriter.print(lawyerBean.toString());
            }
            printWriter.close();
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
